
using MonoTouch.UIKit;
using System;
using MonoTouch.Foundation;
using System.Collections.Generic;
using IphoneTestNavApplication.BL;

namespace IphoneTestNavApplication
{
	partial class RootViewController : UITableViewController
	{
		public RootViewController (IntPtr handle) : base(handle)
		{
		}

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			//Show an edit button
			//NavigationItem.RightBarButtonItem = EditButtonItem;
			
			List<Contatto> contatti = new List<Contatto>();
			contatti.Add(new Contatto(){Nome = "Simone", Cognome = "Agostini", NumeroTelefono = "1"});
			contatti.Add(new Contatto(){Nome = "Edoardo", Cognome = "Agostini", NumeroTelefono = "2"});
			contatti.Add(new Contatto(){Nome = "Claudio", Cognome = "Agostini", NumeroTelefono = "3"});
			this.TableView.Source = new DataSource (contatti);
		}

		/*
		public override void ViewWillAppear (bool animated)
		{
			base.ViewWillAppear (animated);
		}
		*/
		/*
		public override void ViewDidAppear (bool animated)
		{
			base.ViewDidAppear (animated);
		}
		*/
		/*
		public override void ViewWillDisappear (bool animated)
		{
			base.ViewWillDisappear (animated);
		}
		*/
		/*
		public override void ViewDidDisappear (bool animated)
		{
			base.ViewDidDisappear (animated);
		}
		*/

		/*
		// Override to allow orientations other than the default portrait orientation
		public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
		{
			//return true for supported orientations
			return (InterfaceOrientation == UIInterfaceOrientation.Portrait);
		}
		*/

		public override void DidReceiveMemoryWarning ()
		{
			// Releases the view if it doesn't have a superview.
			base.DidReceiveMemoryWarning ();
			
			// Release any cached data, images, etc that aren't in use.
		}

		public override void ViewDidUnload ()
		{
			// Release anything that can be recreated in viewDidLoad or on demand.
			// e.g. this.myOutlet = null;
			
			base.ViewDidUnload ();
		}
	}

}

